import { IRouteComponentProps, Redirect } from 'umi';

export default function Layout({
  children,
  location,
  route,
  history,
  match,
}: IRouteComponentProps) {
  // if (location.pathname === '/login') {
  //   return children;
  // } else {
  //   if (localStorage.getItem('token')) {
  //     return children;
  //   } else {
  //     return <Redirect to="/login"></Redirect>;
  //   }
  // }
  return children;
}
